//
//  MapLocation.m
//  No15.2 map
//
//  Created by Bc_Ltf on 15/1/13.
//  Copyright (c) 2015年 Bc_Ltf. All rights reserved.
//

#import "MapLocation.h"

@interface MapLocation()<MKAnnotation>


@end

@implementation MapLocation
@synthesize stateString;
@synthesize cityString;
@synthesize streetAddressString;
@synthesize zipString;

// 标题
-(NSString*)title{
    return @"您的位置";
}

// 副标题
-(NSString*)subtitle
{
    NSMutableString *ret=[[NSMutableString alloc]init];
    if(stateString)
        [ret appendString:stateString];
    if (cityString) {
        [ret appendString:cityString];
    }
    if (cityString&&stateString) {
        [ret appendString:@","];
    }
    if (stateString&&(cityString||stateString||zipString)) {
        [ret appendString:@"."];
    }
    if (streetAddressString) {
        [ret appendString:streetAddressString];
    }
    if (zipString) {
        [ret appendFormat:@",%@",zipString];
    }
    
    return ret;
}

@end
